package oleg; 

/**
 * Copyright 2008 Oleg Frenkel
 *
 * This file is part of PerfectSearch.
 *
 * PerfectSearch is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * PerfectSearch is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with PerfectSearch.  If not, see <http://www.gnu.org/licenses/>.
 */

import java.io.*;
import java.util.*;
import javax.microedition.io.*;
import javax.microedition.io.file.*;
import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;
import javax.microedition.pim.*;

public class MainSearch extends MIDlet {
  private Display display;
  private MainForm mainForm;

  private int errCounter = 0;

  public MainSearch() {
    display = Display.getDisplay(this);
  }

  public void exitApplication() {
    destroyApp(true);
    notifyDestroyed();
  }

  public void startApp() {

    if (mainForm == null) {
      // Build all contacts list in startApp
      mainForm = new MainForm(this);
    }

    display.setCurrent(mainForm.getForm());
  }


    /**
     * Time to pause, free any space we don't need right now.
     */
    public void pauseApp() {
    }

    /**
     * Destroy must cleanup everything.
     */
    public void destroyApp(boolean unconditional) {
    }
}
